home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 September / 1987-09.d64 / scroll demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  56 lines

  1. 10 rem copyright 1987 compute! publications inc. - all rights reserved
  2. 20 ifpeek(49179)<>56thenload"scroll.ml",8,1
  3. 30 sys49873:poke53280,11:poke53281,0:print"[147]"
  4. 40 print"   copyright 1987 compute! pub., inc."
  5. 50 printtab(10)"all rights reserved[150]"
  6. 60 print"           ...please wait..."
  7. 70 gosub480
  8. 80 gosub320
  9. 90 print"[145]introducing the impossible scroll"
  10. 100 print"program. just watch the scrolling"
  11. 110 print"message at the bottom. note how it"
  12. 120 print"is below the normal data area, away"
  13. 130 print"from interfering with a text display."
  14. 140 gosub430
  15. 150 sys49152
  16. 160 geta$
  17. 170 print"[147][153]the scrolling message can be enlarged"
  18. 180 poke53271,255
  19. 190 print"by changing the program, or by setting"
  20. 200 print"the sprite y-expansion."
  21. 210 gosub430
  22. 220 sys49628:geta$
  23. 230 poke53271,170
  24. 240 print"[154]or how about 'up and down scroll'?":sys49628
  25. 250 print"[147][154]   ...or color changes to the screen?"
  26. 260 fora=0to240:poke49267,a:next:poke198,0
  27. 270 print"[147][154]    press any key to start demo over"
  28. 280 poke53269,0
  29. 290 poke53280,rnd(1)*15:geta$:on-(a$="")goto290:run
  30. 300 end
  31. 310 rem poke in message from data
  32. 320 i=7*4096
  33. 330 read x$:if x$="end" then poke i,0:return
  34. 340 forz=1tolen(x$):g=asc(mid$(x$,z,1)):ifg>=64andg<=95theng=g-64:goto360
  35. 350 ifg>95theng=int(g-128)
  36. 360 pokei,g:i=i+1:next:goto330
  37. 370 rem data for message
  38. 380 data"this is the scroll program which defies the normal physics of the"
  39. 390 data" vic-ii chip...    by using raster interrupts, the program tricks "
  40. 400 data"the computer into displaying sprites below the border. this "
  41. 410 data"enables the user to scroll messages in the area where data usually "
  42. 420 data"doesn't belong!   ","end"
  43. 430 print"";:fora=1to40:print"-";:next
  44. 440 print"[158]       press any key to see more"
  45. 450 fora=1to40:print"-";:next:print"":return
  46. 460 end
  47. 470 rem load a character set
  48. 480 return: <-------rem erase this line to load customized characters
  49. 490 poke49725,96 :rem turn off copy subroutine (poke49725,234 to restore copy)
  50. 500 poke184,2:poke185,0:poke186,8:rem poke 186,1 for datassette
  51. 510 f$="charset":rem the name of the character set
  52. 520 poke183,len(f$):poke187,0:poke188,2:fori=1tolen(f$)
  53. 530 poke511+i,asc(mid$(f$,i,1)):next
  54. 540 poke780,0:poke781,0:poke782,160:sys65493
  55. 550 return
  56.